function Ankhy_Hunter_3()

	--------------------------
	-- Autoaccept LFR invite
	AcceptProposal();
	--------------------------
			if not ccrTargetHasDebuff("Hunter's Mark")
				and Target
				and Target:Exists()
				and not Target:IsDead()
			then
				ccrCast("Hunter's Mark")
				return
			end
	

	if ccrPlayerIsInCombat() then
-- CD's

		-- Stampede
		if ccrTargetIsBoss()
			and SpellIsReady("Stampede") 
			then
			ccrCast("Stampede")
			return
		else
			-- Rapid Fire
			if ccrTargetIsBoss() 
				and SpellIsReady("Rapid Fire") 
				and not (ccrPlayerHasBuff("Bloodlust") or ccrPlayerHasBuff("Time Warp"))
				then
				ccrCast("Rapid Fire")
				return
			else
				-- A Murder of Crows
				if ccrTargetIsBoss()
					and SpellIsReady("A Murder of Crows") and ccrPlayerFocus() >= 60
					then
					ccrCast("A Murder of Crows")
					return
				else
					-- Dire Beat
					if SpellIsReady("Dire Beast") 
						then
						ccrCast("Dire Beast")
						return
					else
						-- Rabid
						if ccrTargetIsBoss()
							and SpellIsReady("Rabid") 
							then
							ccrCast("Rabid")
							return
						else
							-- Glaive Toss
							if SpellIsReady("Glaive Toss") 
								then
								ccrCast("Glaive Toss")
								return
							end
						end
					end
				end
			end
		end
			
			
-- Rotation
		-- Multi-Shot if 4+ targets
		if ccrTargetCount(10) >= 4
			and ccrSpellCanAttack("Multi-Shot") 
			then
				ccrCastAttack("Multi-Shot")
			return
		else
			-- Cobra Shot if 4+ targets
			if ccrTargetCount(10) >= 4
				and ccrPlayerFocus() <= 40
				then
				ccrCastAttack("Cobra Shot")
				return
			end	
		end
		-- Explosive Trap
		if SpellIsReady("Explosive Trap")
			and ccrTargetCount(10) >= 2
			then
				ccrCastAttack("Explosive Trap")
			if SpellIsTargeting() == 1 then CastAtLocation(GetAveragePositionOfObjects(tblPGetNearbyEnemies)) end
			return
		end
		-- Serpent Sting 
		if not ccrTargetHasMyDebuff("Serpent Sting")
			then
				ccrCastAttack("Serpent Sting")
			return
		else
			-- Explosive Shot
			if not ccrTargetHasMyDebuff("Explosive Shot") or (ccrTargetHasMyDebuff("Explosive Shot") and ccrUnitHasMyDebuffDuration("target", "Explosive Shot") <= 0.5)
			and ccrSpellCanAttack("Explosive Shot") and(ccrTargetIsBoss() and onCD("A Murder of Crows"))
				then
					ccrCastAttack("Explosive Shot")
				return
			else
				-- Kill Shot
				if ccrSpellCanAttack("Kill Shot") 
					then
					ccrCastAttack("Kill Shot")
					return
				else
					-- Black Arrow
					if not ccrTargetHasMyDebuff("Black Arrow")
					and ccrSpellCanAttack("Black Arrow") and(ccrTargetIsBoss() and onCD("A Murder of Crows"))
						then
						ccrCastAttack("Black Arrow")
						return
					else
						-- Multi-Shot if more than 2 targets
						if ccrPlayerFocus() >= 30
							and not ccrTargetIsBoss()
							and ccrTargetCount(10) > 2
							and onCD("Explosive Shot") 
							and ccrSpellCanAttack("Multi-Shot") 
								then
								ccrCastAttack("Multi-Shot")
								return
						else
							-- Arcane Shot
							if ccrPlayerFocus() >= 30
								and ccrSpellCanAttack("Arcane Shot") and(ccrTargetIsBoss() and onCD("A Murder of Crows"))
									then
									ccrCastAttack("Arcane Shot")
									return
							else
								-- Cobra Shot
								if ccrSpellCanAttack("Cobra Shot") 
									then
									ccrCastAttack("Cobra Shot")
									return
								end
							end
						end
					end
				end
			end
		end			
	end	
end	
		